package com.haoshuang.zhouzhoubang.ui.page.mine.invite.record

import android.content.Context
import android.os.Bundle
import com.haoshuang.zhouzhoubang.databinding.ActivityInviteTeamMemberRecordBinding
import com.haoshuang.zhouzhoubang.ui.adapter.ViewPagerAdapter
import com.mufeng.libs.base.BaseVMActivity
import com.mufeng.libs.utils.view.click
import com.mufeng.libs.utils.startPage

/**
 *  邀请师傅记录
 */
class InviteTeamMemberRecordActivity : BaseVMActivity<InviteTeamMemberRecordViewModel, ActivityInviteTeamMemberRecordBinding>() {

    companion object {
        fun launch(context: Context){
            context.startPage<InviteTeamMemberRecordActivity>()
        }
    }

    private val titles = arrayListOf("全部", "未入驻", "已入驻")
    private val fragments = arrayListOf(
        InviteTeamMemberRecordChildFragment.getInstance(0),
        InviteTeamMemberRecordChildFragment.getInstance(1),
        InviteTeamMemberRecordChildFragment.getInstance(2),
    )

    override fun initView(savedInstanceState: Bundle?) {
        binding.apply{
            titleBar.title = "邀请师傅记录"
            titleBar.leftImageView().click { finish() }

            val adapter = ViewPagerAdapter(supportFragmentManager, lifecycle, fragments)
            viewPager.adapter = adapter
            slidingTabLayout.setViewPager2(binding.viewPager, titles)
        }
    }

    override fun initData() {
    }

    override fun startObserve() {
    }

}